import java.util.Scanner;

public class D {

	@SuppressWarnings("resource")
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int num = in.nextInt();
		int den = in.nextInt();
		while (num >= den) {
			System.out.println(dividir(num, den));
			num = in.nextInt();
			den = in.nextInt();
		}

	}

	private static long dividir(int num, int den) {
		long acc = 1;
		for (int i = num; i > den; i--) {
			acc *= i;
		}
		return acc;
	}

}
